<template>
  <div>
    <PurchaseOrderTable ref="refOrderList" :tabsValue="tabsValue" :statusList="statusList"
                        @handleOrderShipped="handleOrderShipped"/>
  </div>
</template>

<script>
import PurchaseOrderTable from "@/views/purchase/components/PurchaseOrderTable.vue";
import {sendOutOrderToFPX} from "@/api/order/orderApi";

export default {
  name: "problemOrder",
  components: {
    PurchaseOrderTable,
  },
  data() {
    return {
      tabsValue: "1075",// 燕文订单
      statusList: ['1075'],
    }
  },
  created() {

  },
  methods: {
    // 订单已发货
    handleOrderShipped(row) {
      this.$confirm('是否修改该订单为已发货状态？', '提示').then(() => {
        let data = {
          orderId: row.orderId,
          type: "1"
        }
        sendOutOrderToFPX(data).then(res => {
          this.$message.success(res.msg)
          this.$refs.refOrderList.getList()
        })
      })
    },
  }
}
</script>

<style scoped>

</style>
